<template>
  <div>
    <H1>我是demo01页面</H1>
    <h1>名字{{name}}</h1>
    <h1>年龄{{age}}</h1>
    <button @click="sayname">说姓名</button>
  </div>
</template>

<script>
export default {
  setup () {
    let name='张三'
    let age='18'
     function sayname(){
       alert(name)
     }
    return {
      name,
      age,
      sayname
    }
  }
}
</script>

<style lang="less" scoped>

</style>